package cn.peifu.hrm.feign;

import cn.peifu.hrm.CourseDoc;
import cn.peifu.hrm.fallback.CoursefeignFallbackFactory;
import cn.peifu.hrm.util.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(value = "search-server", fallbackFactory = CoursefeignFallbackFactory.class)
public interface CourseFeign {
    @RequestMapping(value = "/es/course",method = RequestMethod.POST)
    AjaxResult save2Es(@RequestBody CourseDoc courseDoc);
}
